<!--
 * @Author: xuhy
 * @Date: 2022-04-03 22:36:13
 * @LastEditTime: 2022-04-04 09:21:57
 * @LastEditors: Please set LastEditors
 * @Description: 主页
 * @FilePath: \vue_shop\src\components\HomeAccess.vue
-->
<template>
  <el-container>
    <!-- 头部区域 -->
    <el-header
      >Header <el-button type="info" @click="logout">退出</el-button></el-header
    >
    <!-- 页面主题区 -->
    <el-container>
      <!-- 侧边栏 -->
      <el-aside width="200px">Aside</el-aside>
      <!-- 右侧内容主体 -->
      <el-main>Main</el-main>
    </el-container>
  </el-container>
</template>
<script>
export default {
  methods: {
    logout() {
      // 清空token
      window.sessionStorage.clear()
      // 跳转到登录页
      this.$router.push('/login')
    }
  }
}
</script>
<style lang="less" scoped></style>
